package com.jhgsys.internal.contractor.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jhgsys.internal.common.entity.QueryRequest;
import com.jhgsys.internal.contractor.dto.BaseContractorTeamDto;
import com.jhgsys.internal.contractor.entity.BaseContractorTeam;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 承包队设置 Service接口
 *
 * @author admin
 * @date 2024-07-29 14:19:05
 */
public interface IBaseContractorTeamService extends IService<BaseContractorTeam> {
    /**
     * 查询（分页）
     * @author admin
     * @date 2024-07-29 14:19:05
     * @param request QueryRequest
     * @param baseContractorTeam baseContractorTeam
     * @return IPage<BaseContractorTeam>
     */
    IPage<BaseContractorTeamDto> findBaseContractorTeams(QueryRequest request, BaseContractorTeam baseContractorTeam);

    /**
     * 查询（所有）
     * @author admin
     * @date 2024-07-29 14:19:05
     * @param baseContractorTeam baseContractorTeam
     * @return List<BaseContractorTeam>
     */
    List<BaseContractorTeam> findBaseContractorTeams(BaseContractorTeam baseContractorTeam);

    /**
    * 根据ID查询
    * @author admin
    * @date 2024-07-29 14:19:05
    * @param baseContractorTeamId
    * @return BaseContractorTeam
    */
    BaseContractorTeamDto findBaseContractorTeamById(String baseContractorTeamId);

    /**
     * 新增
     * @author admin
     * @date 2024-07-29 14:19:05
     * @param baseContractorTeam baseContractorTeam
     */
    void createBaseContractorTeam(BaseContractorTeamDto baseContractorTeam);

    /**
     * 修改
     * @author admin
     * @date 2024-07-29 14:19:05
     * @param baseContractorTeam baseContractorTeam
     */
    void updateBaseContractorTeam(BaseContractorTeamDto baseContractorTeam);

    /**
     * 逻辑删除
     * @author admin
     * @date 2024-07-29 14:19:05
     * @param baseContractorTeam baseContractorTeam
     * @param baseContractorTeamIds baseContractorTeamIds
     */
    void deleteBaseContractorTeam(BaseContractorTeam baseContractorTeam,String baseContractorTeamIds);

    /**
    * 物理删除
    * @author admin
    * @date 2024-07-29 14:19:05
    * @param baseContractorTeamIds baseContractorTeamIds
    */
    void physicallyDeleteBaseContractorTeam(String baseContractorTeamIds);

    /**
     * 逻辑删除承包商
     * @param contractorTeam
     */
    void updateBaseContractorTeamDeletedFlg(BaseContractorTeam contractorTeam);

    /**
     * 更新承包方实施部门信息
     * @param contractorId
     * @return
     */
    @Transactional
    boolean updateConstructionDept(String tenantId, String contractorId);
}
